3.354 \(\int (a+b \sec (c+d x))^n \tan ^3(c+d x) \, dx\)

Optimal. Leaf size=102 \[ -\frac {a (a+b \sec (c+d x))^{n+1}}{b^2 d (n+1)}+\frac {(a+b \sec (c+d x))^{n+2}}{b^2 d (n+2)}+\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a d (n+1)} \]

[Out]

-a*(a+b*sec(d*x+c))^(1+n)/b^2/d/(1+n)+hypergeom([1, 1+n],[2+n],1+b*sec(d*x+c)/a)*(a+b*sec(d*x+c))^(1+n)/a/d/(1
+n)+(a+b*sec(d*x+c))^(2+n)/b^2/d/(2+n)

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3885, 952, 80, 65} \[ -\frac {a (a+b \sec (c+d x))^{n+1}}{b^2 d (n+1)}+\frac {(a+b \sec (c+d x))^{n+2}}{b^2 d (n+2)}+\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a d (n+1)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*x])^n*Tan[c + d*x]^3,x]

[Out]

-((a*(a + b*Sec[c + d*x])^(1 + n))/(b^2*d*(1 + n))) + (Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*Sec[c + d*x])
/a]*(a + b*Sec[c + d*x])^(1 + n))/(a*d*(1 + n)) + (a + b*Sec[c + d*x])^(2 + n)/(b^2*d*(2 + n))

Rule 65

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)*Hypergeometric2F1[-m, n +
 1, n + 2, 1 + (d*x)/c])/(d*(n + 1)*(-(d/(b*c)))^m), x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Inte
gerQ[m] || GtQ[-(d/(b*c)), 0])

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 952

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(c^p*(d
 + e*x)^(m + 2*p)*(f + g*x)^(n + 1))/(g*e^(2*p)*(m + n + 2*p + 1)), x] + Dist[1/(g*e^(2*p)*(m + n + 2*p + 1)),
 Int[(d + e*x)^m*(f + g*x)^n*ExpandToSum[g*(m + n + 2*p + 1)*(e^(2*p)*(a + c*x^2)^p - c^p*(d + e*x)^(2*p)) - c
^p*(e*f - d*g)*(m + 2*p)*(d + e*x)^(2*p - 1), x], x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0]
&& NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0] && NeQ[m + n + 2*p + 1, 0] && (IntegerQ[n] ||  !IntegerQ[m])

Rule 3885

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> -Dist[(-1)^((m - 1
)/2)/(d*b^(m - 1)), Subst[Int[((b^2 - x^2)^((m - 1)/2)*(a + x)^n)/x, x], x, b*Csc[c + d*x]], x] /; FreeQ[{a, b
, c, d, n}, x] && IntegerQ[(m - 1)/2] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int (a+b \sec (c+d x))^n \tan ^3(c+d x) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n \left (b^2-x^2\right )}{x} \, dx,x,b \sec (c+d x)\right )}{b^2 d}\\ &=\frac {(a+b \sec (c+d x))^{2+n}}{b^2 d (2+n)}-\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n \left (b^2 (2+n)+a (2+n) x\right )}{x} \, dx,x,b \sec (c+d x)\right )}{b^2 d (2+n)}\\ &=-\frac {a (a+b \sec (c+d x))^{1+n}}{b^2 d (1+n)}+\frac {(a+b \sec (c+d x))^{2+n}}{b^2 d (2+n)}-\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n}{x} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=-\frac {a (a+b \sec (c+d x))^{1+n}}{b^2 d (1+n)}+\frac {\, _2F_1\left (1,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}+\frac {(a+b \sec (c+d x))^{2+n}}{b^2 d (2+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.35, size = 118, normalized size = 1.16 \[ \frac {\sec ^2(c+d x) (a+b \sec (c+d x))^n \left (n (a \cos (c+d x)+b) (-a \cos (c+d x)+b n+b)-b^2 \left (n^2+3 n+2\right ) \cos ^2(c+d x) \, _2F_1\left (1,-n;1-n;\frac {a \cos (c+d x)}{b+a \cos (c+d x)}\right )\right )}{b^2 d n (n+1) (n+2)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*x])^n*Tan[c + d*x]^3,x]

[Out]

((n*(b + b*n - a*Cos[c + d*x])*(b + a*Cos[c + d*x]) - b^2*(2 + 3*n + n^2)*Cos[c + d*x]^2*Hypergeometric2F1[1,
-n, 1 - n, (a*Cos[c + d*x])/(b + a*Cos[c + d*x])])*Sec[c + d*x]^2*(a + b*Sec[c + d*x])^n)/(b^2*d*n*(1 + n)*(2
+ n))

________________________________________________________________________________________

fricas [F]  time = 0.50, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{3}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^3,x, algorithm="fricas")

[Out]

integral((b*sec(d*x + c) + a)^n*tan(d*x + c)^3, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^3,x, algorithm="giac")

[Out]

integrate((b*sec(d*x + c) + a)^n*tan(d*x + c)^3, x)

________________________________________________________________________________________

maple [F]  time = 1.14, size = 0, normalized size = 0.00 \[ \int \left (a +b \sec \left (d x +c \right )\right )^{n} \left (\tan ^{3}\left (d x +c \right )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))^n*tan(d*x+c)^3,x)

[Out]

int((a+b*sec(d*x+c))^n*tan(d*x+c)^3,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^n*tan(d*x+c)^3,x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)^n*tan(d*x + c)^3, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\left (c+d\,x\right )}^3\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^3*(a + b/cos(c + d*x))^n,x)

[Out]

int(tan(c + d*x)^3*(a + b/cos(c + d*x))^n, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \tan ^{3}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))**n*tan(d*x+c)**3,x)

[Out]

Integral((a + b*sec(c + d*x))**n*tan(c + d*x)**3, x)

________________________________________________________________________________________